package com.fjnu.controller.borrow;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.fjnu.controller.common.BaseController;
import com.fjnu.entities.MainInstrument;
import com.fjnu.service.InstrumentService;

/**
 * 根据存放地遍历资产
 * @author 默默
 *
 */
@Controller
public class HQBorrowController extends BaseController{
	@Autowired
	private InstrumentService instrumentService;
	/**
	 * 根据存放地查找资产
	 * @param landId
	 * @return
	 */
	@RequestMapping(value="/findHQBorrow")
	@ResponseBody
	public Map<String,Object> findHQBorrow(Integer landId){
		if(!init(landId).get(STATUS).equals(SUCCESS))
			return getData2Result();
		List<MainInstrument> list=instrumentService.findManyByRLand(landId);
		put("data",list);
		return getData2Result();
	}
}
